﻿Imports Actuariat
Imports PTIC_Util

Public Interface IInputMoteurEqTarif
    Property NombrePeriodes As Integer
    Event NombrePeriodesChanging As PropertyChangeEventHandler(Of Integer)
    Event NombrePeriodesChanged As PropertyChangeEventHandler(Of Integer)

    Property TauxNominalPretPeriode As Double
    Event TauxNominalPretPeriodeChanging As PropertyChangeEventHandler(Of Double)
    Event TauxNominalPretPeriodeChanged As PropertyChangeEventHandler(Of Double)

    Property CapitalInitial As Double
    Event CapitalInitialChanging As PropertyChangeEventHandler(Of Double)
    Event CapitalInitialChanged As PropertyChangeEventHandler(Of Double)

    Property ageSous As Integer
    Event ageSousChanging As PropertyChangeEventHandler(Of Integer)
    Event ageSousChanged As PropertyChangeEventHandler(Of Integer)

    Property sexeAssu As String
    Event sexeAssuChanging As PropertyChangeEventHandler(Of String)
    Event sexeAssuChanged As PropertyChangeEventHandler(Of String)

    Property ageFinDC As Double
    Event ageFinDCChanging As PropertyChangeEventHandler(Of Double)
    Event ageFinDCChanged As PropertyChangeEventHandler(Of Double)

    Property ageFinINCINV As Double
    Event ageFinINCINVChanging As PropertyChangeEventHandler(Of Double)
    Event ageFinINCINVChanged As PropertyChangeEventHandler(Of Double)

    Property TableMort As ITableMortalite
    Event TableMortChanging As PropertyChangeEventHandler(Of ITableMortalite)
    Event TableMortChanged As PropertyChangeEventHandler(Of ITableMortalite)

    Property TableMaintINCINV_Fra As ITableMaintienINCINV_Fra
    Event TableMaintINCINV_FraChanging As PropertyChangeEventHandler(Of ITableMaintienINCINV_Fra)
    Event TableMaintINCINV_FraChanged As PropertyChangeEventHandler(Of ITableMaintienINCINV_Fra)

    Property TableMaintINCINV_Tx As ITableMaintienINCINV_Tx
    Event TableMaintINCINV_TxChanging As PropertyChangeEventHandler(Of ITableMaintienINCINV_Tx)
    Event TableMaintINCINV_TxChanged As PropertyChangeEventHandler(Of ITableMaintienINCINV_Tx)
End Interface

Public Class InputMoteurEqTarif
    Inherits PTIC_Util.BaseNotifyPropertyChangeComponentModel
    Implements IInputMoteurEqTarif

    Public Sub New(ByVal AgeFinDC As Double, ByVal AgeFinINCINV As Double, ByVal AgeSous As Integer,
                   ByVal CapitalInitial As Double, ByVal NombrePeriodes As Integer, ByVal sexeAssu As String,
                   ByVal TableMort As ITableMortalite, ByVal TableMaintINCINV_Tx As ITableMaintienINCINV_Tx,
                   ByVal TableMaintINCINV_Fra As ITableMaintienINCINV_Fra, ByVal TauxNominalPretPeriode As Double)
        m_AgeFinDC = AgeFinDC
        m_AgeFinINCINV = AgeFinINCINV
        m_AgeSous = AgeSous
        m_CapitalInitial = CapitalInitial
        m_NombrePeriodes = NombrePeriodes
        m_SexeAssu = sexeAssu
        m_TableMort = TableMort
        m_TableMaintINCINV_Tx = TableMaintINCINV_Tx
        m_TableMaintINCINV_Fra = TableMaintINCINV_Fra
        m_TauxNominalPretPeriode = TauxNominalPretPeriode
    End Sub

    Private m_AgeFinDC As Double
    Public Property ageFinDC As Double Implements IInputMoteurEqTarif.ageFinDC
        Get
            Return m_AgeFinDC
        End Get
        Set(ByVal value As Double)
            OnPropertyChanging("ageFinDC")
            Dim e As New PropertyChangeEventArgs(Of Double)(ageFinDC, value)
            If e.IsValide Then RaiseEvent ageFinDCChanging(Me, e)
            If e.IsValide Then
                m_AgeFinDC = e.NewValue
                OnPropertyChanged("ageFinDC")
                RaiseEvent ageFinDCChanged(Me, e)
            End If
        End Set
    End Property
    Public Event ageFinDCChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.ageFinDCChanged
    Public Event ageFinDCChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.ageFinDCChanging

    Private m_AgeFinINCINV As Double
    Public Property ageFinINCINV As Double Implements IInputMoteurEqTarif.ageFinINCINV
        Get
            Return m_AgeFinINCINV
        End Get
        Set(ByVal value As Double)
            OnPropertyChanging("ageFinINCINV")
            Dim e As New PropertyChangeEventArgs(Of Double)(ageFinINCINV, value)
            If e.IsValide Then RaiseEvent ageFinINCINVChanging(Me, e)
            If e.IsValide Then
                m_AgeFinINCINV = e.NewValue
                OnPropertyChanged("ageFinINCINV")
                RaiseEvent ageFinINCINVChanged(Me, e)
            End If
        End Set
    End Property
    Public Event ageFinINCINVChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.ageFinINCINVChanged
    Public Event ageFinINCINVChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.ageFinINCINVChanging

    Private m_AgeSous As Integer
    Public Property ageSous As Integer Implements IInputMoteurEqTarif.ageSous
        Get
            Return m_AgeSous
        End Get
        Set(ByVal value As Integer)
            OnPropertyChanging("ageSous")
            Dim e As New PropertyChangeEventArgs(Of Integer)(ageSous, value)
            If e.IsValide Then RaiseEvent ageSousChanging(Me, e)
            If e.IsValide Then
                m_AgeSous = e.NewValue
                OnPropertyChanged("ageSous")
                RaiseEvent ageSousChanged(Me, e)
            End If
        End Set
    End Property
    Public Event ageSousChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Integer)) Implements IInputMoteurEqTarif.ageSousChanged
    Public Event ageSousChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Integer)) Implements IInputMoteurEqTarif.ageSousChanging

    Private m_CapitalInitial As Double
    Public Property CapitalInitial As Double Implements IInputMoteurEqTarif.CapitalInitial
        Get
            Return m_CapitalInitial
        End Get
        Set(ByVal value As Double)
            OnPropertyChanging("CapitalInitial")
            Dim e As New PropertyChangeEventArgs(Of Double)(CapitalInitial, value)
            If e.IsValide Then RaiseEvent CapitalInitialChanging(Me, e)
            If e.IsValide Then
                m_CapitalInitial = e.NewValue
                OnPropertyChanged("CapitalInitial")
                RaiseEvent CapitalInitialChanged(Me, e)
            End If
        End Set
    End Property
    Public Event CapitalInitialChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.CapitalInitialChanged
    Public Event CapitalInitialChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.CapitalInitialChanging

    Private m_NombrePeriodes As Integer
    Public Property NombrePeriodes As Integer Implements IInputMoteurEqTarif.NombrePeriodes
        Get
            Return m_NombrePeriodes
        End Get
        Set(ByVal value As Integer)
            OnPropertyChanging("NombrePeriodes")
            Dim e As New PropertyChangeEventArgs(Of Integer)(NombrePeriodes, value)
            If e.IsValide Then RaiseEvent NombrePeriodesChanging(Me, e)
            If e.IsValide Then
                m_NombrePeriodes = e.NewValue
                OnPropertyChanged("NombrePeriodes")
                RaiseEvent NombrePeriodesChanged(Me, e)
            End If
        End Set
    End Property
    Public Event NombrePeriodesChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Integer)) Implements IInputMoteurEqTarif.NombrePeriodesChanged
    Public Event NombrePeriodesChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Integer)) Implements IInputMoteurEqTarif.NombrePeriodesChanging

    Private m_SexeAssu As String
    Public Property sexeAssu As String Implements IInputMoteurEqTarif.sexeAssu
        Get
            Return m_SexeAssu
        End Get
        Set(ByVal value As String)
            OnPropertyChanging("sexeAssu")
            Dim e As New PropertyChangeEventArgs(Of String)(sexeAssu, value)
            If e.IsValide Then RaiseEvent sexeAssuChanging(Me, e)
            If e.IsValide Then
                m_SexeAssu = e.NewValue
                OnPropertyChanged("sexeAssu")
                RaiseEvent sexeAssuChanged(Me, e)
            End If
        End Set
    End Property
    Public Event sexeAssuChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of String)) Implements IInputMoteurEqTarif.sexeAssuChanged
    Public Event sexeAssuChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of String)) Implements IInputMoteurEqTarif.sexeAssuChanging

    Private m_TableMaintINCINV_Fra As ITableMaintienINCINV_Fra
    Public Property TableMaintINCINV_Fra As Actuariat.ITableMaintienINCINV_Fra Implements IInputMoteurEqTarif.TableMaintINCINV_Fra
        Get
            Return m_TableMaintINCINV_Fra
        End Get
        Set(ByVal value As Actuariat.ITableMaintienINCINV_Fra)
            OnPropertyChanging("TableMaintINCINV_Fra")
            Dim e As New PropertyChangeEventArgs(Of ITableMaintienINCINV_Fra)(TableMaintINCINV_Fra, value)
            If e.IsValide Then RaiseEvent TableMaintINCINV_FraChanging(Me, e)
            If e.IsValide Then
                m_TableMaintINCINV_Fra = e.NewValue
                OnPropertyChanged("TableMaintINCINV_Fra")
                RaiseEvent TableMaintINCINV_FraChanged(Me, e)
            End If
        End Set
    End Property
    Public Event TableMaintINCINV_FraChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMaintienINCINV_Fra)) Implements IInputMoteurEqTarif.TableMaintINCINV_FraChanged
    Public Event TableMaintINCINV_FraChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMaintienINCINV_Fra)) Implements IInputMoteurEqTarif.TableMaintINCINV_FraChanging

    Private m_TableMaintINCINV_Tx As ITableMaintienINCINV_Tx
    Public Property TableMaintINCINV_Tx As Actuariat.ITableMaintienINCINV_Tx Implements IInputMoteurEqTarif.TableMaintINCINV_Tx
        Get
            Return m_TableMaintINCINV_Tx
        End Get
        Set(ByVal value As Actuariat.ITableMaintienINCINV_Tx)
            OnPropertyChanging("TableMaintINCINV_Tx")
            Dim e As New PropertyChangeEventArgs(Of ITableMaintienINCINV_Tx)(TableMaintINCINV_Tx, value)
            If e.IsValide Then RaiseEvent TableMaintINCINV_TxChanging(Me, e)
            If e.IsValide Then
                m_TableMaintINCINV_Tx = e.NewValue
                OnPropertyChanged("TableMaintINCINV_Tx")
                RaiseEvent TableMaintINCINV_TxChanged(Me, e)
            End If
        End Set
    End Property
    Public Event TableMaintINCINV_TxChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMaintienINCINV_Tx)) Implements IInputMoteurEqTarif.TableMaintINCINV_TxChanged
    Public Event TableMaintINCINV_TxChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMaintienINCINV_Tx)) Implements IInputMoteurEqTarif.TableMaintINCINV_TxChanging

    Private m_TableMort As ITableMortalite
    Public Property TableMort As Actuariat.ITableMortalite Implements IInputMoteurEqTarif.TableMort
        Get
            Return m_TableMort
        End Get
        Set(ByVal value As Actuariat.ITableMortalite)
            OnPropertyChanging("TableMort")
            Dim e As New PropertyChangeEventArgs(Of ITableMortalite)(TableMort, value)
            If e.IsValide Then RaiseEvent TableMortChanging(Me, e)
            If e.IsValide Then
                m_TableMort = e.NewValue
                OnPropertyChanged("TableMort")
                RaiseEvent TableMortChanged(Me, e)
            End If
        End Set
    End Property
    Public Event TableMortChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMortalite)) Implements IInputMoteurEqTarif.TableMortChanged
    Public Event TableMortChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Actuariat.ITableMortalite)) Implements IInputMoteurEqTarif.TableMortChanging

    Private m_TauxNominalPretPeriode As Double
    Public Property TauxNominalPretPeriode As Double Implements IInputMoteurEqTarif.TauxNominalPretPeriode
        Get
            Return m_TauxNominalPretPeriode
        End Get
        Set(ByVal value As Double)
            OnPropertyChanging("TauxNominalPretPeriode")
            Dim e As New PropertyChangeEventArgs(Of Double)(TauxNominalPretPeriode, value)
            If e.IsValide Then RaiseEvent TauxNominalPretPeriodeChanging(Me, e)
            If e.IsValide Then
                m_TauxNominalPretPeriode = e.NewValue
                OnPropertyChanged("TauxNominalPretPeriode")
                RaiseEvent TauxNominalPretPeriodeChanged(Me, e)
            End If
        End Set
    End Property
    Public Event TauxNominalPretPeriodeChanged(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.TauxNominalPretPeriodeChanged
    Public Event TauxNominalPretPeriodeChanging(ByVal sender As Object, ByVal e As PTIC_Util.PropertyChangeEventArgs(Of Double)) Implements IInputMoteurEqTarif.TauxNominalPretPeriodeChanging

End Class